Dynamic Optimization of Interpreters using DynamoRIO

نویسندگان

  • Iris Baron
  • Saman Amarasinghe
  • Arthur C. Smith
چکیده

Interpreters are widely used in domain-specific, dynamic, and scripting languages. While their implementation is relatively simple, their performance is poor. In this thesis we improve the performance of interpreters using dynamic optimization techniques. This task is challenging because the information regarding the interpreted program is not known until the interpreter is run. Efficient implementations of interpreters (such as Just-in-Time compilers) require a runtime system that performs optimization dynamically, using program specialization. Such solutions incur high engineering cost. Furthermore, they are usually language-specific and hardware-dependent, and thus are not portable or reusable. We create a single software dynamic optimizer that can be applied to different interpreters. Our system, DynamoRIO-with-LogPC is based on DynamoRIO’s infrastructure, which is a dynamic optimization tool. While DynamoRIO is very efficient in a broad range of applications, typical interpreters’ implementation foils DynamoRIO’s strategy of trace collection. In addition, DynamoRIO’s low-level optimization is unable to extract sufficient high-level semantics of the interpreted program to perform many of the necessary optimizations. We provide simple annotations to the interpreters and modify the trace creation methodology of DynamoRIO such that its traces correspond to frequent sequences of code in the high-level program (the interpreted program), rather than in the interpreter. Then, we use standard optimization techniques such as constant propagation, dead code elimination, and partial evaluation to further improve the traces created. We also present two techniques to avoid unrolling native loops. Such loops might create too long traces that harm performance. Our experimental results on Kaffe and TinyVM interpreters show that DynamoRIO-withLogPC outperforms DynamoRIO and is faster than the native program by 50-90%. While these results are not comparable with those of a hand-crafted native compiler, we believe that it provides an appealing point on the language implementation spectrum. Thesis Supervisor: Saman Amarasinghe Title: Associate Professor

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Ameliorating the Overhead of Dynamic Optimization

Dynamic optimization has several key advantages. This includes the ability to work on binary code in the absence of sources and to perform optimization across module boundaries. However, it has a significant disadvantage viz-a-viz traditional static optimization: it has a significant runtime overhead. There can be performance gain only if the overhead can be amortized. In this paper, we will qu...

متن کامل

Characterizing Inter-Execution and Inter-Application Optimization Persistence

Dynamic translation and optimization systems employ code caches to improve performance and to support reuse of dynamically generated code sequences within a single run of an application. However, these intra-application caching techniques are ineffective at amortizing runtime costs on shortrunning applications or scripts that repeatedly invoke the same application. For these situations, dynamic...

متن کامل

Efficient, transparent, and comprehensive runtime code manipulation

This thesis addresses the challenges of building a software system for general-purpose runtime code manipulation. Modern applications, with dynamically-loaded modules and dynamicallygenerated code, are assembled at runtime. While it was once feasible at compile time to observe and manipulate every instruction — which is critical for program analysis, instrumentation, trace gathering, optimizati...

متن کامل

Umbra – A Tutorial from client share detect.c

Umbra is an efficient and scalable memory shadowing tool built on top of DynamoRIO, which is a state-ofthe-art runtime code manipulation system. Using the APIs provided by DynamoRIO, Umbra inserts code into the applications runtime instruction stream to perform memory address translation from application memory to shadow memory. Umbra also provides a simple interface that enables developers to ...

متن کامل

Experiences Constructing a Lightweight SPARC Interpreter for a Dynamic Binary Translator

Dynamic binary translation is an important area for compiler research, because additional information available at runtime can substantially improve the effectiveness of optimizations. The difficulty lies in creating a system capable of gathering runtime information without slowing down the running executable. Several such systems have been created (Dynamo, DynamoRIO, FX!32, etc.), but their us...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003